package com.muyu.payment.domain.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 退款申请请求
 *
 * @author muyu
 * @date 2025-09-18
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "退款申请请求")
public class PaymentRefundApplyReq {

    /**
     * 原订单号
     */
    @NotBlank(message = "原订单号不能为空")
    @Schema(description = "原订单号", required = true)
    private String orderNo;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID", required = true)
    private Long userId;

    /**
     * 退款金额
     */
    @NotNull(message = "退款金额不能为空")
    @DecimalMin(value = "0.01", message = "退款金额必须大于0")
    @Schema(description = "退款金额", required = true)
    private BigDecimal refundAmount;

    /**
     * 退款原因
     */
    @NotBlank(message = "退款原因不能为空")
    @Schema(description = "退款原因", required = true)
    private String refundReason;

    /**
     * 支付类型
     */
    @Schema(description = "支付类型")
    private Integer payType;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;
}